#define DEBUG
#include <cstdio>

using namespace std;

bool check_dfs(int n, int *a, int suma, int sumb) {
  return n>a[0] ? suma==sumb : (check_dfs(n+1, a, suma+a[n], sumb) || check_dfs(n+1, a, suma, sumb+a[n]));
}

bool check(int a) {
  static int aa[10];
  aa[0]=0;
  for (int i=1; i<=a; i*=10) {
	aa[++aa[0]] = a/i%10;
  }

  return check_dfs(1, aa, 0, 0);
}

int main() {
#ifdef DEBUG
  // freopen("1.in", "r", stdin);
  freopen("temp.out", "w", stdout);
#endif

  // int a, b;
  // scanf("%d %d", &a, &b);

  // int ans=0;
  const int block=1000000;
  printf("{");
  for (int i=1, ans=0; i<=1000000000; i++) {
    if (i%block==1) {
      ans=0;
    }
    ans += check(i);
    if (i%block==0) {
      printf("%d,", ans);
    }
  }

  fclose(stdin);
  fclose(stdout);
}
